<script setup>
import { ref } from 'vue'
import DirectValue from './../config_direct_value'

const visible = ref(false)
const id = ref()

const open = (value) => {
    id.value = value
    visible.value = true
}

const close = () => {
    visible.value = false
    id.value = null
}

//把方法暴露给父组件
defineExpose({
    open
})
</script>
    <template>
    <el-dialog v-model="visible" title="字典值" center @close="close" destroy-on-close :width="800">
        <direct-value v-if="id" :typeCode="id"/>
    </el-dialog>
</template>
    